package org.hh.jga.concurrent;

/**
 * Adapter class for body loop with environment argument
 * 
 * @author Hong Hong
 *
 * @param <T> Type of Iterable element
 * @param <E> Type of environment argument
 */
public abstract class LoopBodyWithEnvi<T, E> implements LoopBody<T> {
	protected final E m_env;
	public abstract void body(T a) throws Exception;
	protected E getEnv() {
		return m_env;
	}
	public LoopBodyWithEnvi(final E env) {
		m_env = env;
	}
	public LoopBodyWithEnvi() {
		m_env = null;
	}
}
